package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.domain.DeliveryBillentry;
import com.ruoyi.business.mapper.DeliveryBillentryMapper;
import com.ruoyi.business.service.DeliveryBillentryService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author JerryLu
 * @date 2024/8/25 10:54
 * @description 发货物料明细Service业务层处理
 */
@Service
public class DeliveryBillentryServiceImpl extends ServiceImpl<DeliveryBillentryMapper, DeliveryBillentry> implements DeliveryBillentryService {
    @Override
    public List<DeliveryBillentry> queryList(DeliveryBillentry deliveryBillentry) {
        QueryWrapper<DeliveryBillentry> queryWrapper = Wrappers.query();
        if (deliveryBillentry.getDeliveryId() > 0) {
            queryWrapper.eq("delivery_id", deliveryBillentry.getDeliveryId());
        }
        return this.list(queryWrapper);
    }
}
